<h1 id="Tombstone"><a href="#Tombstone" class="headerlink" title="Tombstone"></a>Tombstone</h1><p><img src="img/tombstone.gif" alt align="right"></p>
<p>死亡creep的遗物。这个对象不阻碍行走。</p>
<table class="table gameplay-info">
    <tbody>
    <tr>
        <td><strong>消失</strong></td>
        <td>死去的creep每个身体部件5 tick</td>
    </tr>
    </tbody>
</table>

<h2 id="Tombstone.effects" class="api-property api-property--property  "><span class="api-property__name">effects</span><span class="api-property__type">array</span></h2>
<p>附加的效果，一个包含如下属性的对象数组：</p>
<table><thead><tr><th>parameter</th><th>type</th><th>description</th></tr></thead><tbody>
<tr><td><code>effect</code></td><td>number</td><td><p>该附加效果的 ID。可以是自然效果 ID 或者 Power ID。</p>
</td>
</tr><tr><td><code>level (可选)</code></td><td>number </td><td><p>该附加效果的 Power 等级。如果效果不是 Power 效果则不存在该属性。</p>
</td>
</tr><tr><td><code>ticksRemaining</code></td><td>number</td><td><p>多长时间之后会失去这个效果。</p>
</td>
</tr></tbody></table>

<h2 id="Tombstone.pos" class="api-property api-property--property api-property--inherited "><div class="api-property__inherited">Inherited from <a href="#RoomObject">RoomObject</a></div><span class="api-property__name">pos</span><span class="api-property__type"><a href="#RoomPosition">RoomPosition</a></span></h2>
<p>表示该对象在房间中的坐标的对象。</p>
<h2 id="Tombstone.room" class="api-property api-property--property api-property--inherited "><div class="api-property__inherited">Inherited from <a href="#RoomObject">RoomObject</a></div><span class="api-property__name">room</span><span class="api-property__type"><a href="#Room">Room</a></span></h2>
<p>Room对象的链接。如果对象是标志或工地并且放置在你不可见的房间中，则可能为undefined。</p>

<h2 id="Tombstone.creep" class="api-property api-property--property  "><span class="api-property__name">creep</span><span class="api-property__type"><a href="#Creep">Creep</a> | <a href="#PowerCreep">PowerCreep</a></span></h2>
<pre class="highlight javascript tab-javascript "><code>room<span class="token punctuation">.</span><span class="token function">find</span><span class="token punctuation">(</span><span class="token constant">FIND_TOMBSTONES</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token parameter">tombstone</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>tombstone<span class="token punctuation">.</span>creep<span class="token punctuation">.</span>my<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">My creep died with ID=</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>tombstone<span class="token punctuation">.</span>creep<span class="token punctuation">.</span>id<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string"> </span><span class="token template-punctuation string">`</span></span> <span class="token operator">+</span>
             <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">and role=</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>Memory<span class="token punctuation">.</span>creeps<span class="token punctuation">[</span>tombstone<span class="token punctuation">.</span>creep<span class="token punctuation">.</span>name<span class="token punctuation">]</span><span class="token punctuation">.</span>role<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>   
    <span class="token punctuation">}</span>    
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre><pre class="highlight javascript tab-javascript "><code>room<span class="token punctuation">.</span><span class="token function">find</span><span class="token punctuation">(</span><span class="token constant">FIND_TOMBSTONES</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">forEach</span><span class="token punctuation">(</span><span class="token parameter">tombstone</span> <span class="token operator">=></span> <span class="token punctuation">{</span>
    <span class="token keyword">if</span><span class="token punctuation">(</span>tombstone<span class="token punctuation">.</span>creep <span class="token keyword">instanceof</span> <span class="token class-name">PowerCreep</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">Power creep died here</span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span><span class="token punctuation">;</span>   
    <span class="token punctuation">}</span>    
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
`</code></pre><p>一个内含死亡creep或超能creep的对象。</p>
<h2 id="Tombstone.deathTime" class="api-property api-property--property  "><span class="api-property__name">deathTime</span><span class="api-property__type">number</span></h2>
<p>死亡时间。</p>
<h2 id="Tombstone.id" class="api-property api-property--property  "><span class="api-property__name">id</span><span class="api-property__type">string</span></h2>
<p>一个唯一的对象标识。你可以使用<a href="#Game.getObjectById"><code>Game.getObjectById</code></a>方法获取对象实例。</p>
<h2 id="Tombstone.store" class="api-property api-property--property  "><span class="api-property__name">store</span><span class="api-property__type"><a href="#Store">Store</a></span></h2>
<p>一个表示该结构所存储资源的 <a href="#Store"><code>Store</code></a> 对象。</p>
<h2 id="Tombstone.ticksToDecay" class="api-property api-property--property  "><span class="api-property__name">ticksToDecay</span><span class="api-property__type">number</span></h2>
<p>这个墓碑消失的剩余时间。</p>
